package com.example.test1.serviceimpl;

import com.example.test1.bean.UserBean;
import com.example.test1.mapper.UserMapper;
import com.example.test1.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;
    @Override
    public UserBean getUserById(int id){
        return userMapper.getUserById(id);
    }
    @Override
    public int deleteUser(int id){
        return userMapper.deleteUser(id);
    }
    @Override
    public int insertUser(UserBean userBean){
        return userMapper.insertUser(userBean);
    }
    @Override
    public List<UserBean> getAllUser(){
        return userMapper.getAllUser();
    }
    @Override
    public UserBean loginIn(String name, String password){
        return userMapper.getInfo(name, password);
    }
}
